package tdemo;
 abstract class Yuan
{

    int age;
    String name;
    public Yuan(String name)
    {
        this.name=name;
    }
    public int a;
    public abstract void draw();
    public static int b;

}
 class Si extends Yuan
 {
     public Si(String name)
     {
         super(name);
     }
     public void draw()
     {
         System.out.println(name+"画四边形");
     }
 }
 class Wu extends Yuan
 {
     public Wu(String name)
     {
         super(name);
     }
     public void draw()
     {
         System.out.println(name+"画五边形");
     }
 }
class Liu extends Yuan
{
    public Liu(String name)
    {
        super(name);
    }
    public void draw()
    {
        System.out.println(name+"画六边形");
    }
}





public class tsd {
    // public static void drawbin(Yuan a)
     //{
         //a.draw();
    // }

    public static void main56(String[] args) {
        Yuan[]shapes={new Si("hello1"),new Wu("hello2"),new Liu("hello3")};
        for (Yuan a: shapes) {
            a.draw();

        }
    }

   /* public static void main1(String[] args) {
         Si si=new Si("hello1");
         drawbin(si);
         drawbin(new Wu("hello2"));
         drawbin(new Liu("hello3"));


    }
    */



}
